home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_perl.idb / usr / freeware / catman / p_man / cat3 / Getopt::Long.Z / Getopt::Long
Encoding:
Text File  |  1998-10-28  |  27.2 KB  |  727 lines

  1.  
  2.  
  3.  
  4.      GGGGeeeettttoooopppptttt::::::::LLLLoooonnnngggg((((3333)))) 22223333////JJJJuuuullll////99998888 ((((ppppeeeerrrrllll 5555....000000005555,,,, ppppaaaattttcccchhhh 00002222))))  GGGGeeeettttoooopppptttt::::::::LLLLoooonnnngggg((((3333))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.       GetOptions - extended    processing of command line options
  10.  
  11.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.         use    Getopt::Long;
  13.         $result = GetOptions (...option-descriptions...);
  14.  
  15.  
  16.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  17.       The Getopt::Long module implements an    extended getopt
  18.       function called _G_e_t_O_p_t_i_o_n_s().    This function adheres to the
  19.       POSIX    syntax for command line    options, with GNU extensions.
  20.       In general, this means that options have long    names instead
  21.       of single letters, and are introduced    with a double dash "-
  22.       -". Support for bundling of command line options, as was the
  23.       case with the    more traditional single-letter approach, is
  24.       provided but not enabled by default. For example, the    UNIX
  25.       "ps" command can be given the    command    line "option"
  26.  
  27.         -vax
  28.  
  29.       which    means the combination of ----vvvv, ----aaaa    and ----xxxx.    With the new
  30.       syntax --------vvvvaaaaxxxx would be    a single option, probably indicating a
  31.       computer architecture.
  32.  
  33.       Command line options can be used to set values. These    values
  34.       can be specified in one of two ways:
  35.  
  36.         --size 24
  37.         --size=24
  38.  
  39.       GetOptions is    called with a list of option-descriptions,
  40.       each of which    consists of two    elements: the option specifier
  41.       and the option linkage.  The option specifier    defines    the
  42.       name of the option and, optionally, the value    it can take.
  43.       The option linkage is    usually    a reference to a variable that
  44.       will be set when the option is used. For example, the
  45.       following call to GetOptions:
  46.  
  47.         GetOptions("size=i"    => \$offset);
  48.  
  49.       will accept a    command    line option "size" that    must have an
  50.       integer value. With a    command    line of    "--size    24" this will
  51.       cause    the variable $offset to    get the    value 24.
  52.  
  53.       Alternatively, the first argument to GetOptions may be a
  54.       reference to a HASH describing the linkage for the options,
  55.       or an    object whose class is based on a HASH. The following
  56.       call is equivalent to    the example above:
  57.  
  58.         %optctl = ("size" => \$offset);
  59.         GetOptions(\%optctl, "size=i");
  60.  
  61.  
  62.  
  63.      Page 1                        (printed 10/23/98)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      GGGGeeeettttoooopppptttt::::::::LLLLoooonnnngggg((((3333)))) 22223333////JJJJuuuullll////99998888 ((((ppppeeeerrrrllll 5555....000000005555,,,, ppppaaaattttcccchhhh 00002222))))  GGGGeeeettttoooopppptttt::::::::LLLLoooonnnngggg((((3333))))
  71.  
  72.  
  73.  
  74.       Linkage may be specified using either    of the above methods,
  75.       or both.  Linkage specified in the argument list takes
  76.       precedence over the linkage specified    in the HASH.
  77.  
  78.       The command line options are taken from array    @ARGV. Upon
  79.       completion of    GetOptions, @ARGV will contain the rest    (i.e.
  80.       the non-options) of the command line.
  81.  
  82.       Each option specifier    designates the name of the option,
  83.       optionally followed by an argument specifier.
  84.  
  85.       Options that do not take arguments will have no argument
  86.       specifier. The option    variable will be set to    1 if the
  87.       option is used.
  88.  
  89.       For the other    options, the values for    argument specifiers
  90.       are:
  91.  
  92.       !      Option does not take an argument and may be negated,
  93.           i.e. prefixed    by "no". E.g. "foo!" will allow    --------ffffoooooooo
  94.           (with    value 1) and ----nnnnooooffffoooooooo (with value    0).  The
  95.           option variable will be set to 1, or 0 if negated.
  96.  
  97.       +      Option does not take an argument and will be
  98.           incremented by 1 every time it appears on the
  99.           command line.    E.g. "more+", when used    with --------mmmmoooorrrreeee
  100.           --------mmmmoooorrrreeee --------mmmmoooorrrreeee, will set the option variable to 3
  101.           (provided it was 0 or    undefined at first).
  102.  
  103.           The ++++    specifier is ignored if    the option destination
  104.           is not a SCALAR.
  105.  
  106.       =s      Option takes a mandatory string argument.  This
  107.           string will be assigned to the option    variable.
  108.           Note that even if the    string argument    starts with ----
  109.           or --------, it will not be    considered an option on
  110.           itself.
  111.  
  112.       :s      Option takes an optional string argument.  This
  113.           string will be assigned to the option    variable.  If
  114.           omitted, it will be assigned "" (an empty string).
  115.           If the string    argument starts    with ---- or --------, it will
  116.           be considered    an option on itself.
  117.  
  118.       =i      Option takes a mandatory integer argument.  This
  119.           value    will be    assigned to the    option variable.  Note
  120.           that the value may start with    ---- to indicate a
  121.           negative value.
  122.  
  123.       :i      Option takes an optional integer argument.  This
  124.           value    will be    assigned to the    option variable.  If
  125.           omitted, the value 0 will be assigned.  Note that
  126.  
  127.  
  128.  
  129.      Page 2                        (printed 10/23/98)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      GGGGeeeettttoooopppptttt::::::::LLLLoooonnnngggg((((3333)))) 22223333////JJJJuuuullll////99998888 ((((ppppeeeerrrrllll 5555....000000005555,,,, ppppaaaattttcccchhhh 00002222))))  GGGGeeeettttoooopppptttt::::::::LLLLoooonnnngggg((((3333))))
  137.  
  138.  
  139.  
  140.           the value may    start with ---- to    indicate a negative
  141.           value.
  142.  
  143.       =f      Option takes a mandatory real    number argument.  This
  144.           value    will be    assigned to the    option variable.  Note
  145.           that the value may start with    ---- to indicate a
  146.           negative value.
  147.  
  148.       :f      Option takes an optional real    number argument.  This
  149.           value    will be    assigned to the    option variable.  If
  150.           omitted, the value 0 will be assigned.
  151.  
  152.       A lone dash ----    is considered an option, the corresponding
  153.       option name is the empty string.
  154.  
  155.       A double dash    on itself -------- signals end of the    options    list.
  156.  
  157.       LLLLiiiinnnnkkkkaaaaggggeeee ssssppppeeeecccciiiiffffiiiiccccaaaattttiiiioooonnnn
  158.  
  159.       The linkage specifier    is optional. If    no linkage is
  160.       explicitly specified but a ref HASH is passed, GetOptions
  161.       will place the value in the HASH. For    example:
  162.  
  163.         %optctl = ();
  164.         GetOptions (\%optctl, "size=i");
  165.  
  166.       will perform the equivalent of the assignment
  167.  
  168.         $optctl{"size"} = 24;
  169.  
  170.       For array options, a reference to an array is    used, e.g.:
  171.  
  172.         %optctl = ();
  173.         GetOptions (\%optctl, "sizes=i@");
  174.  
  175.       with command line "-sizes 24 -sizes 48" will perform the
  176.       equivalent of    the assignment
  177.  
  178.         $optctl{"sizes"} = [24, 48];
  179.  
  180.       For hash options (an option whose argument looks like
  181.       "name=value"), a reference to    a hash is used,    e.g.:
  182.  
  183.         %optctl = ();
  184.         GetOptions (\%optctl, "define=s%");
  185.  
  186.       with command line "--define foo=hello    --define bar=world"
  187.       will perform the equivalent of the assignment
  188.  
  189.         $optctl{"define"} =    {foo=>'hello', bar=>'world')
  190.  
  191.       If no    linkage    is explicitly specified    and no ref HASH    is
  192.  
  193.  
  194.  
  195.      Page 3                        (printed 10/23/98)
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.      GGGGeeeettttoooopppptttt::::::::LLLLoooonnnngggg((((3333)))) 22223333////JJJJuuuullll////99998888 ((((ppppeeeerrrrllll 5555....000000005555,,,, ppppaaaattttcccchhhh 00002222))))  GGGGeeeettttoooopppptttt::::::::LLLLoooonnnngggg((((3333))))
  203.  
  204.  
  205.  
  206.       passed, GetOptions will put the value    in a global variable
  207.       named    after the option, prefixed by "opt_". To yield a
  208.       usable Perl variable,    characters that    are not    part of    the
  209.       syntax for variables are translated to underscores. For
  210.       example, "--fpp-struct-return" will set the variable
  211.       $opt_fpp_struct_return. Note that this variable resides in
  212.       the namespace    of the calling program,    not necessarily    mmmmaaaaiiiinnnn.
  213.       For example:
  214.  
  215.         GetOptions ("size=i", "sizes=i@");
  216.  
  217.       with command line "-size 10 -sizes 24    -sizes 48" will
  218.       perform the equivalent of the    assignments
  219.  
  220.         $opt_size =    10;
  221.         @opt_sizes = (24, 48);
  222.  
  223.       A lone dash ----    is considered an option, the corresponding
  224.       Perl identifier is $opt_ .
  225.  
  226.       The linkage specifier    can be a reference to a    scalar,    a
  227.       reference to an array, a reference to    a hash or a reference
  228.       to a subroutine.
  229.  
  230.       Note that, if    your code is running under the recommended use
  231.       strict 'vars'    pragma,    it may be helpful to declare these
  232.       package variables via    use vars perhaps something like    this:
  233.  
  234.         use    vars qw/ $opt_size @opt_sizes $opt_bar /;
  235.  
  236.       If a REF SCALAR is supplied, the new value is    stored in the
  237.       referenced variable. If the option occurs more than once,
  238.       the previous value is    overwritten.
  239.  
  240.       If a REF ARRAY is supplied, the new value is appended
  241.       (pushed) to the referenced array.
  242.  
  243.       If a REF HASH    is supplied, the option    value should look like
  244.       "key"    or "key=value" (if the "=value"    is omitted then    a
  245.       value    of 1 is    implied).  In this case, the element of    the
  246.       referenced hash with the key "key" is    assigned "value".
  247.  
  248.       If a REF CODE    is supplied, the referenced subroutine is
  249.       called with two arguments: the option    name and the option
  250.       value.  The option name is always the    true name, not an
  251.       abbreviation or alias.
  252.  
  253.       AAAAlllliiiiaaaasssseeeessss aaaannnndddd aaaabbbbbbbbrrrreeeevvvviiiiaaaattttiiiioooonnnnssss
  254.  
  255.       The option name may actually be a list of option names,
  256.       separated by "|"s, e.g. "foo|bar|blech=s". In    this example,
  257.       "foo"    is the true name of this option. If no linkage is
  258.  
  259.  
  260.  
  261.      Page 4                        (printed 10/23/98)
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.      GGGGeeeettttoooopppptttt::::::::LLLLoooonnnngggg((((3333)))) 22223333////JJJJuuuullll////99998888 ((((ppppeeeerrrrllll 5555....000000005555,,,, ppppaaaattttcccchhhh 00002222))))  GGGGeeeettttoooopppptttt::::::::LLLLoooonnnngggg((((3333))))
  269.  
  270.  
  271.  
  272.       specified, options "foo", "bar" and "blech" all will set
  273.       $opt_foo. For    convenience, the single    character "?" is
  274.       allowed as an    alias, e.g. "help|?".
  275.  
  276.       Option names may be abbreviated to uniqueness, depending on
  277.       configuration    option aaaauuuuttttoooo____aaaabbbbbbbbrrrreeeevvvv.
  278.  
  279.       NNNNoooonnnn----ooooppppttttiiiioooonnnn ccccaaaallllllll----bbbbaaaacccckkkk rrrroooouuuuttttiiiinnnneeee
  280.  
  281.       A special option specifier, <>, can be used to designate a
  282.       subroutine to    handle non-option arguments. GetOptions    will
  283.       immediately call this    subroutine for every non-option    it
  284.       encounters in    the options list.  This    subroutine gets    the
  285.       name of the non-option passed.  This feature requires
  286.       configuration    option ppppeeeerrrrmmmmuuuutttteeee,    see section CONFIGURATION
  287.       OPTIONS.
  288.  
  289.       See also the examples.
  290.  
  291.       OOOOppppttttiiiioooonnnn ssssttttaaaarrrrtttteeeerrrrssss
  292.  
  293.       On the command line, options can start with ----    (traditional),
  294.       -------- (POSIX) and ++++ (GNU, now being phased out).    The latter is
  295.       not allowed if the environment variable PPPPOOOOSSSSIIIIXXXXLLLLYYYY____CCCCOOOORRRRRRRREEEECCCCTTTT has
  296.       been defined.
  297.  
  298.       Options that start with "--" may have    an argument appended,
  299.       separated with an "=", e.g. "--foo=bar".
  300.  
  301.       RRRReeeettttuuuurrrrnnnn vvvvaaaalllluuuueeeessss    aaaannnndddd EEEErrrrrrrroooorrrrssss
  302.  
  303.       Configuration    errors and errors in the option    definitions
  304.       are signalled    using die() and    will terminate the calling
  305.       program unless the call to Getopt::Long::GetOptions()    was
  306.       embedded in eval { ... } or die() was    trapped    using
  307.       $SIG{__DIE__}.
  308.  
  309.       A return value of 1 (true) indicates success.
  310.  
  311.       A return status of 0 (false) indicates that the function
  312.       detected one or more errors during option parsing. These
  313.       errors are signalled using warn() and    can be trapped with
  314.       $SIG{__WARN__}.
  315.  
  316.       Errors that can't happen are signalled using Carp::croak().
  317.  
  318.      CCCCOOOOMMMMPPPPAAAATTTTIIIIBBBBIIIILLLLIIIITTTTYYYY
  319.       _G_e_t_o_p_t::_L_o_n_g::_G_e_t_O_p_t_i_o_n_s() is    the successor of nnnneeeewwwwggggeeeettttoooopppptttt....ppppllll
  320.       that came with Perl 4. It is fully upward compatible.     In
  321.       fact,    the Perl 5 version of newgetopt.pl is just a wrapper
  322.       around the module.
  323.  
  324.  
  325.  
  326.  
  327.      Page 5                        (printed 10/23/98)
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.      GGGGeeeettttoooopppptttt::::::::LLLLoooonnnngggg((((3333)))) 22223333////JJJJuuuullll////99998888 ((((ppppeeeerrrrllll 5555....000000005555,,,, ppppaaaattttcccchhhh 00002222))))  GGGGeeeettttoooopppptttt::::::::LLLLoooonnnngggg((((3333))))
  335.  
  336.  
  337.  
  338.       If an    "@" sign is appended to    the argument specifier,    the
  339.       option is treated as an array. _V_a_l_u_e(s) are not set, but
  340.       pushed into array @opt_name. If explicit linkage is
  341.       supplied, this must be a reference to    an ARRAY.
  342.  
  343.       If an    "%" sign is appended to    the argument specifier,    the
  344.       option is treated as a hash. _V_a_l_u_e(s)    of the form
  345.       "name=value" are set by setting the element of the hash
  346.       %opt_name with key "name" to "value" (if the "=value"
  347.       portion is omitted it    defaults to 1).    If explicit linkage is
  348.       supplied, this must be a reference to    a HASH.
  349.  
  350.       If configuration option ggggeeeettttoooopppptttt____ccccoooommmmppppaaaatttt    is set (see section
  351.       CONFIGURATION    OPTIONS), options that start with "+" or "-"
  352.       may also include their arguments, e.g. "+foo=bar". This is
  353.       for compatiblity with    older implementations of the GNU
  354.       "getopt" routine.
  355.  
  356.       If the first argument    to GetOptions is a string consisting
  357.       of only non-alphanumeric characters, it is taken to specify
  358.       the option starter characters. Everything starting with one
  359.       of these characters from the starter will be considered an
  360.       option. UUUUssssiiiinnnngggg    aaaa ssssttttaaaarrrrtttteeeerrrr aaaarrrrgggguuuummmmeeeennnntttt iiiissss ssssttttrrrroooonnnnggggllllyyyy ddddeeeepppprrrreeeeccccaaaatttteeeedddd....
  361.  
  362.       For convenience, option specifiers may have a    leading    ---- or
  363.       --------, so it is possible    to write:
  364.  
  365.          GetOptions    qw(-foo=s --bar=i --ar=s);
  366.  
  367.  
  368.      EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
  369.       If the option    specifier is "one:i" (i.e. takes an optional
  370.       integer argument), then the following    situations are
  371.       handled:
  372.  
  373.          -one -two          -> $opt_one =    '', -two is next option
  374.          -one -2          -> $opt_one =    -2
  375.  
  376.       Also,    assume specifiers "foo=s" and "bar:s" :
  377.  
  378.          -bar -xxx          -> $opt_bar =    '', '-xxx' is next option
  379.          -foo -bar          -> $opt_foo =    '-bar'
  380.          -foo --          -> $opt_foo =    '--'
  381.  
  382.       In GNU or POSIX format, option names and values can be
  383.       combined:
  384.  
  385.          +foo=blech          -> $opt_foo =    'blech'
  386.          --bar=          -> $opt_bar =    ''
  387.          --bar=--          -> $opt_bar =    '--'
  388.  
  389.       Example of using variable references:
  390.  
  391.  
  392.  
  393.      Page 6                        (printed 10/23/98)
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.      GGGGeeeettttoooopppptttt::::::::LLLLoooonnnngggg((((3333)))) 22223333////JJJJuuuullll////99998888 ((((ppppeeeerrrrllll 5555....000000005555,,,, ppppaaaattttcccchhhh 00002222))))  GGGGeeeettttoooopppptttt::::::::LLLLoooonnnngggg((((3333))))
  401.  
  402.  
  403.  
  404.          $ret = GetOptions ('foo=s', \$foo,    'bar=i', 'ar=s', \@ar);
  405.  
  406.       With command line options "-foo blech    -bar 24    -ar xx -ar yy"
  407.       this will result in:
  408.  
  409.          $foo = 'blech'
  410.          $opt_bar =    24
  411.          @ar = ('xx','yy')
  412.  
  413.       Example of using the <> option specifier:
  414.  
  415.          @ARGV = qw(-foo 1 bar -foo    2 blech);
  416.          GetOptions("foo=i", \$myfoo, "<>",    \&mysub);
  417.  
  418.       Results:
  419.  
  420.          mysub("bar") will be called (with $myfoo being 1)
  421.          mysub("blech") will be called (with $myfoo    being 2)
  422.  
  423.       Compare this with:
  424.  
  425.          @ARGV = qw(-foo 1 bar -foo    2 blech);
  426.          GetOptions("foo=i", \$myfoo);
  427.  
  428.       This will leave the non-options in @ARGV:
  429.  
  430.          $myfoo -> 2
  431.          @ARGV -> qw(bar blech)
  432.  
  433.  
  434.      CCCCOOOONNNNFFFFIIIIGGGGUUUURRRRAAAATTTTIIIIOOOONNNN OOOOPPPPTTTTIIIIOOOONNNNSSSS
  435.       GGGGeeeettttOOOOppppttttiiiioooonnnnssss can be configured by calling subroutine
  436.       GGGGeeeettttoooopppptttt::::::::LLLLoooonnnngggg::::::::CCCCoooonnnnffffiiiigggguuuurrrreeee. This    subroutine takes a list    of
  437.       quoted strings, each specifying a configuration option to be
  438.       set, e.g.  iiiiggggnnnnoooorrrreeee____ccccaaaasssseeee. Options can be reset by prefixing
  439.       with nnnnoooo____, e.g.  nnnnoooo____iiiiggggnnnnoooorrrreeee____ccccaaaasssseeee. Case does not    matter.
  440.       Multiple calls to ccccoooonnnnffffiiiigggg are possible.
  441.  
  442.       Previous versions of Getopt::Long used variables for the
  443.       purpose of configuring. Although manipulating    these
  444.       variables still work,    it is strongly encouraged to use the
  445.       new ccccoooonnnnffffiiiigggg routine. Besides, it is much easier.
  446.  
  447.       The following    options    are available:
  448.  
  449.       default     This option causes all configuration options to
  450.               be reset to their    default    values.
  451.  
  452.       auto_abbrev Allow option names to be abbreviated to
  453.               uniqueness.  Default is set unless environment
  454.               variable POSIXLY_CORRECT has been    set, in    which
  455.               case aaaauuuuttttoooo____aaaabbbbbbbbrrrreeeevvvv is reset.
  456.  
  457.  
  458.  
  459.      Page 7                        (printed 10/23/98)
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.      GGGGeeeettttoooopppptttt::::::::LLLLoooonnnngggg((((3333)))) 22223333////JJJJuuuullll////99998888 ((((ppppeeeerrrrllll 5555....000000005555,,,, ppppaaaattttcccchhhh 00002222))))  GGGGeeeettttoooopppptttt::::::::LLLLoooonnnngggg((((3333))))
  467.  
  468.  
  469.  
  470.       getopt_compat
  471.               Allow '+'    to start options.  Default is set
  472.               unless environment variable POSIXLY_CORRECT has
  473.               been set,    in which case ggggeeeettttoooopppptttt____ccccoooommmmppppaaaatttt is reset.
  474.  
  475.       require_order
  476.               Whether non-options are allowed to be mixed with
  477.               options.    Default    is set unless environment
  478.               variable POSIXLY_CORRECT has been    set, in    which
  479.               case b<require_order> is reset.
  480.  
  481.               See also ppppeeeerrrrmmmmuuuutttteeee,    which is the opposite of
  482.               rrrreeeeqqqquuuuiiiirrrreeee____oooorrrrddddeeeerrrr.
  483.  
  484.       permute     Whether non-options are allowed to be mixed with
  485.               options.    Default    is set unless environment
  486.               variable POSIXLY_CORRECT has been    set, in    which
  487.               case ppppeeeerrrrmmmmuuuutttteeee is reset.  Note that    ppppeeeerrrrmmmmuuuutttteeee    is the
  488.               opposite of rrrreeeeqqqquuuuiiiirrrreeee____oooorrrrddddeeeerrrr.
  489.  
  490.               If ppppeeeerrrrmmmmuuuutttteeee is set, this means that
  491.  
  492.               -foo arg1 -bar arg2 arg3
  493.  
  494.               is equivalent to
  495.  
  496.               -foo -bar arg1 arg2 arg3
  497.  
  498.               If a non-option call-back    routine    is specified,
  499.               @ARGV will always    be empty upon succesful    return
  500.               of GetOptions since all options have been
  501.               processed, except    when --------    is used:
  502.  
  503.               -foo arg1 -bar arg2 -- arg3
  504.  
  505.               will call    the call-back routine for arg1 and
  506.               arg2, and    terminate leaving arg2 in @ARGV.
  507.  
  508.               If rrrreeeeqqqquuuuiiiirrrreeee____oooorrrrddddeeeerrrr is set, options processing
  509.               terminates when the first    non-option is
  510.               encountered.
  511.  
  512.               -foo arg1 -bar arg2 arg3
  513.  
  514.               is equivalent to
  515.  
  516.               -foo -- arg1 -bar arg2 arg3
  517.  
  518.  
  519.       bundling (default: reset)
  520.               Setting this variable to a non-zero value    will
  521.               allow single-character options to    be bundled. To
  522.  
  523.  
  524.  
  525.      Page 8                        (printed 10/23/98)
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.      GGGGeeeettttoooopppptttt::::::::LLLLoooonnnngggg((((3333)))) 22223333////JJJJuuuullll////99998888 ((((ppppeeeerrrrllll 5555....000000005555,,,, ppppaaaattttcccchhhh 00002222))))  GGGGeeeettttoooopppptttt::::::::LLLLoooonnnngggg((((3333))))
  533.  
  534.  
  535.  
  536.               distinguish bundles from long option names, long
  537.               options must be introduced with -------- and single-
  538.               character    options    (and bundles) with ----. For
  539.               example,
  540.  
  541.               ps -vax --vax
  542.  
  543.               would be equivalent to
  544.  
  545.               ps -v    -a -x --vax
  546.  
  547.               provided "vax", "v", "a" and "x" have been
  548.               defined to be valid options.
  549.  
  550.               Bundled options can also include a value in the
  551.               bundle; for strings this value is    the rest of
  552.               the bundle, but integer and floating values may
  553.               be combined in the bundle, e.g.
  554.  
  555.               scale    -h24w80
  556.  
  557.               is equivalent to
  558.  
  559.               scale    -h 24 -w 80
  560.  
  561.               Note: resetting bbbbuuuunnnnddddlllliiiinnnngggg also resets
  562.               bbbbuuuunnnnddddlllliiiinnnngggg____oooovvvveeeerrrrrrrriiiiddddeeee.
  563.  
  564.       bundling_override (default: reset)
  565.               If bbbbuuuunnnnddddlllliiiinnnngggg____oooovvvveeeerrrrrrrriiiiddddeeee is set, bundling is enabled
  566.               as with bbbbuuuunnnnddddlllliiiinnnngggg but now long option names
  567.               override option bundles. In the above example,
  568.               ----vvvvaaaaxxxx would be interpreted    as the option "vax",
  569.               not the bundle "v", "a", "x".
  570.  
  571.               Note: resetting bbbbuuuunnnnddddlllliiiinnnngggg____oooovvvveeeerrrrrrrriiiiddddeeee    also resets
  572.               bbbbuuuunnnnddddlllliiiinnnngggg.
  573.  
  574.               NNNNooootttteeee:::: Using option bundling can easily lead to
  575.               unexpected results, especially when mixing long
  576.               options and bundles. Caveat emptor.
  577.  
  578.       ignore_case  (default: set)
  579.               If set, case is ignored when matching options.
  580.  
  581.               Note: resetting iiiiggggnnnnoooorrrreeee____ccccaaaasssseeee also resets
  582.               iiiiggggnnnnoooorrrreeee____ccccaaaasssseeee____aaaallllwwwwaaaayyyyssss.
  583.  
  584.       ignore_case_always (default: reset)
  585.               When bundling is in effect, case is ignored on
  586.               single-character options also.
  587.  
  588.  
  589.  
  590.  
  591.      Page 9                        (printed 10/23/98)
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.      GGGGeeeettttoooopppptttt::::::::LLLLoooonnnngggg((((3333)))) 22223333////JJJJuuuullll////99998888 ((((ppppeeeerrrrllll 5555....000000005555,,,, ppppaaaattttcccchhhh 00002222))))  GGGGeeeettttoooopppptttt::::::::LLLLoooonnnngggg((((3333))))
  599.  
  600.  
  601.  
  602.               Note: resetting iiiiggggnnnnoooorrrreeee____ccccaaaasssseeee____aaaallllwwwwaaaayyyyssss also resets
  603.               iiiiggggnnnnoooorrrreeee____ccccaaaasssseeee.
  604.  
  605.       pass_through (default: reset)
  606.               Unknown options are passed through in @ARGV
  607.               instead of being flagged as errors. This makes
  608.               it possible to write wrapper scripts that
  609.               process only part    of the user supplied options,
  610.               and passes the remaining options to some other
  611.               program.
  612.  
  613.               This can be very confusing, especially when
  614.               ppppeeeerrrrmmmmuuuutttteeee is also set.
  615.  
  616.       prefix      The string that starts options. See also
  617.               pppprrrreeeeffffiiiixxxx____ppppaaaatttttttteeeerrrrnnnn.
  618.  
  619.       prefix_pattern
  620.               A    Perl pattern that identifies the strings that
  621.               introduce    options.  Default is (--|-|\+) unless
  622.               environment variable POSIXLY_CORRECT has been
  623.               set, in which case it is (--|-).
  624.  
  625.       debug    (default: reset)
  626.               Enable copious debugging output.
  627.  
  628.      OOOOTTTTHHHHEEEERRRR UUUUSSSSEEEEFFFFUUUULLLL VVVVAAAARRRRIIIIAAAABBBBLLLLEEEESSSS
  629.       $Getopt::Long::VERSION
  630.               The version number of this Getopt::Long
  631.               implementation in    the format major.minor.    This
  632.               can be used to have Exporter check the version,
  633.               e.g.
  634.  
  635.               use Getopt::Long 3.00;
  636.  
  637.               You can inspect $Getopt::Long::major_version and
  638.               $Getopt::Long::minor_version for the individual
  639.               components.
  640.  
  641.       $Getopt::Long::error
  642.               Internal error flag. May be incremented from a
  643.               call-back    routine    to cause options parsing to
  644.               fail.
  645.  
  646.      AAAAUUUUTTTTHHHHOOOORRRR
  647.       Johan    Vromans    <jvromans@squirrel.nl>
  648.  
  649.      CCCCOOOOPPPPYYYYRRRRIIIIGGGGHHHHTTTT AAAANNNNDDDD DDDDIIIISSSSCCCCLLLLAAAAIIIIMMMMEEEERRRR
  650.       This program is Copyright 1990,1998 by Johan Vromans.     This
  651.       program is free software; you    can redistribute it and/or
  652.       modify it under the terms of the GNU General Public License
  653.       as published by the Free Software Foundation;    either version
  654.  
  655.  
  656.  
  657.      Page 10                        (printed 10/23/98)
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.      GGGGeeeettttoooopppptttt::::::::LLLLoooonnnngggg((((3333)))) 22223333////JJJJuuuullll////99998888 ((((ppppeeeerrrrllll 5555....000000005555,,,, ppppaaaattttcccchhhh 00002222))))  GGGGeeeettttoooopppptttt::::::::LLLLoooonnnngggg((((3333))))
  665.  
  666.  
  667.  
  668.       2 of the License, or (at your    option)    any later version.
  669.  
  670.       This program is distributed in the hope that it will be
  671.       useful, but WITHOUT ANY WARRANTY; without even the implied
  672.       warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  673.       PURPOSE.  See    the GNU    General    Public License for more
  674.       details.
  675.  
  676.       If you do not    have a copy of the GNU General Public License
  677.       write    to the Free Software Foundation, Inc., 675 Mass    Ave,
  678.       Cambridge, MA    02139, USA.
  679.  
  680.  
  681.  
  682.  
  683.  
  684.  
  685.  
  686.  
  687.  
  688.  
  689.  
  690.  
  691.  
  692.  
  693.  
  694.  
  695.  
  696.  
  697.  
  698.  
  699.  
  700.  
  701.  
  702.  
  703.  
  704.  
  705.  
  706.  
  707.  
  708.  
  709.  
  710.  
  711.  
  712.  
  713.  
  714.  
  715.  
  716.  
  717.  
  718.  
  719.  
  720.  
  721.  
  722.  
  723.      Page 11                        (printed 10/23/98)
  724.  
  725.  
  726.  
  727.